package com.yunxin.core.domain.service.user;

import com.yunxin.core.domain.model.user.UserAuth;
import com.yunxin.core.domain.model.user.UserInfo;
import com.yunxin.core.domain.model.user.UserIpInfo;
import com.yunxin.core.domain.model.user.UserVisitorInfo;

/**
 * @author zero°
 * @since 2023-06-02
 */
public interface UserService {

    /**
     * 用户注册登录
     * @param userInfo userInfo
     * @param identifierMd5 identifierMd5
     * @param loginSource loginSource
     */
    boolean userRegisterLogin(UserInfo userInfo, String identifierMd5, String loginSource);

    /**
     * 用户授权登录
     * @param userAuth userAuth
     * @param visitorId  visitorId
     * @param channelPromotionCode  channelPromotionCode
     * @param city city
     * @param loginSource loginSource
     */
    void userAuthLogin(UserAuth userAuth, String visitorId, String channelPromotionCode, String city, String loginSource);

    /**
     * 保存访问者信息
     * @param visitorInfo visitorInfo
     */
    boolean saveUserVisitorInfo(UserVisitorInfo visitorInfo);

    /**
     * 保存ip信息
     * @param userIpInfo userIpInfo
     */
    boolean saveUserIpInfo(UserIpInfo userIpInfo);

}
